require 'rubygems'
require 'rake/rdoctask'
require 'rake/gempackagetask'
#Gem::manage_gems

gem = Gem::Specification.new do |s|
	s.platform = Gem::Platform::RUBY
	s.required_ruby_version = '>= 1.8.6'
	s.name = "autocode"
	s.version = "0.9.2"
	s.homepage = 'http://dev.zeraweb.com/'
	s.add_dependency 'metaid'
	s.summary	= "Utility for auto-including, reloading, and generating classes and modules."
	s.files = Dir['doc/**/*','lib/**/*.rb']
	s.bindir = 'bin'
	s.executables = []
	s.require_path = 'lib'
	s.has_rdoc = true
end

task( :package => :clean ) { Gem::Builder.new( gem ).build } 
task( :clean ) { `rm -rf *.gem` }
task( :install => [ :package, :rdoc ] ) { `sudo gem install *.gem` }
task( :publish => [ :package, :rdoc ] ) do
  `rubyforge login`
  `rubyforge add_release #{gem.name} #{gem.name} #{gem.version} #{gem.name}-#{gem.version}.gem`
end

Rake::RDocTask.new do |rdoc|
  rdoc.rdoc_dir = 'doc/rdoc'
  rdoc.options << '--line-numbers'
  rdoc.rdoc_files.add([ 'lib/**/*.rb', 'README', 'HISTORY' ])
end
